package com.franklin.java.entity.sql;

import com.franklin.plugins.common.utils.DataCheckUtils;

/**
 * @author Franklin
 * @since 2021/8/31 14:24
 */
public class ColumnInfo {

    /**
     * 表名
     */
    private String tableName;
    private String columnName;
    private String alias;

    private String columnType = "varchar(32)";
    private String comment = "";
    private String javaType;
    private Integer columnIndex;
    private Integer columnSum = 0;
    /**
     * 表描述
     */
    private String tableComment = "";

    private boolean isId = false;

    public ColumnInfo(String tableName, String columnName, String alias) {
        this.tableName = tableName;
        this.columnName = columnName;
        this.alias = alias;
    }

    public String getTableComment() {
        return tableComment;
    }

    public void setTableComment(String tableComment) {
        this.tableComment = tableComment;
    }

    public boolean isId() {
        return isId;
    }

    public void setId(boolean id) {
        isId = id;
    }

    public Integer getColumnSum() {
        return columnSum;
    }

    public void setColumnSum(Integer columnSum) {
        this.columnSum = columnSum;
    }

    public Integer getColumnIndex() {
        return columnIndex;
    }

    public void setColumnIndex(Integer columnIndex) {
        this.columnIndex = columnIndex;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getTableName() {
        return tableName;
    }

    public String getColumnName() {
        return columnName;
    }

    public String getAlias() {
        return alias;
    }

    public void setColumnType(String columnType) {
        if (DataCheckUtils.isNotEmpty(columnType)) {
            this.columnType = columnType;
        }
    }

    public String getColumnType() {
        return columnType;
    }

    public String getJavaType() {
        return javaType;
    }

    public void setJavaType(String javaType) {
        this.javaType = javaType;
    }
}
